<%@page import="com.passkeeper.jdbc.model.Account"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>列表</title>
<script type="text/javascript">
	function doQuery(){
		document.form1.submit();
	}
	function doAdd(){
		window.location.href="add.jsp";
	}
</script>
</head>
<body>
	<form action="../account/list.action" name="form1" method="post">
	<table  width="100%" height="100" cellpadding="3" cellspacing="0" border="1" 
		bordercolordark="ffffff" bordercolorlight="#cccccc">
		<tr>
			<td colspan="4">查询</td>
		</tr>
		<tr>
			<td>帐号:</td>
			<td><input name="account" type="text" value=""/></td>
			<td>类型:</td>
			<td>
				<select name="type">
					<option value="">--请选择--</option>
					<option value="1">类型1</option>
					<option value="2">类型2</option>
					<option value="3">类型3</option>
				</select>
			</td>
		</tr>
		<tr>
			<td colspan="4" align="center"><input type="button" name="queryButton" value="查询" onclick="doQuery()"/></td>
		</tr>
	</table>
	</form>
	<input type="button" name="addButton" value="添加" onclick="doAdd()"/>
	<table  width="100%" cellpadding="3" cellspacing="0" border="1" 
		bordercolordark="ffffff" bordercolorlight="#cccccc">
		<tr>
			<td>名称</td>
			<td>帐号</td>
			<td>密码</td>
			<td>操作</td>
		</tr>
		<%
		List<Account> list=(List<Account>) request.getAttribute("list");
		if(list!=null)
			for(Account account:list){
		%>
		<tr>
			<td><div title="<%=account.getCaption() %>"><%=account.getName() %></div></td>
			<td><%=account.getAccount() %></td>
			<td><%=account.getPassword() %></td>
			<td></td>
		</tr>
		<%} %>
	</table>
</body>
</html>